package me.zhengjie.modules.shop.domain.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class BackProductDTO {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "自增id")
    private Long id;

    @ApiModelProperty(value = "店铺id【平台上架的商品默认为0】")
    private Long storeId;

    @NotNull
    @ApiModelProperty(value = "商品大类id")
    private Long moduleId;

    @NotNull
    @ApiModelProperty(value = "商品大类id")
    private Long topModuleId;

    @ApiModelProperty(value = "商品名称")
    private String name;

    @ApiModelProperty(value = "商品封面图")
    private String cover;

    @ApiModelProperty(value = "商品简介")
    private String intro;

    @ApiModelProperty(value = "总销量")
    private Integer sold;

    @ApiModelProperty(value = "上下架【0：下架 1：上架】")
    private Integer status;

    @ApiModelProperty(value = "图片资源【商品的图片】")
    private String resources;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "描述")
    private String remark;

    @ApiModelProperty(value = "邮费")
    private BigDecimal fee;

    @TableField(exist = false)
    @ApiModelProperty(value = "ids【商品大类】")
    private List<Long> ids;

    @TableField(exist = false)
    @ApiModelProperty(value = "商品大类名称")
    private String moduleIdName;
}
